<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
<title>Hello APP</title>
<link rel="stylesheet" type="text/css" href="../../css/swiper.css" />
<link rel="stylesheet" type="text/css" href="../../css/aui-flex.css" />
<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
<link rel="stylesheet" type="text/css" href="../../css/common.css" />
<style>

</style>
</head>

<body>
	<div id="topBox">
		<header class="aui-bar aui-bar-nav aui-bar-light" id="header">
			<div class="aui-pull-left back" tapmode onClick="api.closeWin();"></div>
			<div class="aui-title" id="pageTitle"></div>
			<div class="aui-pull-right headRightBtn aui-hide" tapmode onClick="openShare();"><img src="../../image/common/06.png" alt=""></div>
		</header>
		<!-- <div class="sortBox">
			<div class="sortList aui-flex-col aui-flex-middle">
				<div class="active" tapmode onClick="changeSort(0);">综合</div>
				<div tapmode onClick="changeSort(1);">优惠券</div>
				<div tapmode onClick="changeSort(2);">佣金</div>
				<div class="sort_price" tapmode onClick="changeSort(3);"><span>价格</span></div>
			</div>
		</div> -->
	</div>
</body>
<script type="text/javascript" src="../../script/import.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript" src="../../script/swiper.min.js"></script>
<script type="text/javascript">
    apiready = function() {
        api.parseTapmode();
				console.log(api.pageParam.key);
		var header = $api.byId('topBox');
        $api.fixStatusBar(header);
        var headerH = $api.offset(header).h;
        api.openFrame({
            name: 'subject_frm',
            url: 'subject_frm.html',
            rect: {
                x: 0,
                y: headerH,
                w: 'auto',
                h: 'auto'

            },
			useWKWebView: true,
			bounces: true,
			bgColor: '#f5f5f5',
            pageParam: api.pageParam
        });

    };
//切换排序
function changeSort(ind){
	if(ind==3){
		if( $$('.sortList .sort_price').hasClass('on') ){
			$$('.sortList .sort_price').removeClass('on');
		}else if($$('.sortList .sort_price').hasClass('active')){
			$$('.sortList .sort_price').addClass('on');
		}
	}else{
		$$('.sortList .sort_price').removeClass('on');
	}
	$$('.sortList > div').removeClass('active').eq(ind).addClass('active');
}
//分享
function openShare(){
	api.openFrame({
		name: 'share_btm_mask',
		url: 'widget://html/share_btm_mask.html',
		rect: {
			x: 0,
			y: 0,
			w: 'auto',
			h: 'auto'
		},
		bounces: false,
		animation: {
			type: 'fade',
			duration:300
		},
		pageParam: {
			wname: api.winName,
			fname: api.frameName
		}
	});
}
</script>
</html>
